package com.daidai.apps;

import com.alibaba.druid.pool.DruidDataSource;
import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App2 {
    //管理第三方bean
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContent.xml");
        DruidDataSource dataSourceDruid = context.getBean("druidDataSource", DruidDataSource.class);

        ComboPooledDataSource c3p0DataSource = context.getBean("c3p0DataSource", ComboPooledDataSource.class);
        System.out.println(c3p0DataSource);
    }
}
